package com.hdsx.springboot.controller;

import com.hdsx.springboot.bean.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 占贤银
 * time 2024/5/18 15:41
 * description 生命之灯因热情而点燃，生命之舟因拼搏而前行
 */
@RestController
public class IndexController {

    @Resource
    private User user;

    @Value("${user.username}")
    private String username;

    @Value("${user.password}")
    private String password;

    @GetMapping("/index")
    public String index() {
        return "欢迎登录！用户名：" + user.getUsername() + ", 密码:" + user.getPassword();
    }
}
